
import 'app_plugin_platform_interface.dart';

class AppPlugin {
  ///单例模式
  static final AppPlugin _singleton = AppPlugin._internal();

  factory AppPlugin() => _singleton;

  AppPlugin._internal();

  static AppPlugin instance() => AppPlugin();
  Future<String?> getPlatformVersion() {
    return AppPluginPlatform.instance.getPlatformVersion();
  }

  Future<void> startVpn(String configJson) {
    return AppPluginPlatform.instance.startVpn(configJson);
  }

  Future<void> stopVpn() {
    return AppPluginPlatform.instance.stopVpn();
  }
}
